package org.javaboy.demo;

import okhttp3.OkHttpClient;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Lyh
 * @date 2024/2/20 1:44
 * @desciption:
 */
public class Demo02 {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
        OkHttpClient client = ctx.getBean("okHttpClient2",OkHttpClient.class);
        OkHttpClient client1 = ctx.getBean("okHttpClient2",OkHttpClient.class);
        System.out.println("client = " + client);
        System.out.println(client1==client);
    }
}
